package com.b2.controller.wx;

import com.b2.pojo.entity.Director;
import com.b2.result.Result;
import com.b2.service.DirectorService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/wx/Kindergardern")
@Slf4j
@Api(tags = "微信幼儿园相关接口")
@CrossOrigin
public class KindergardenController {



       @Autowired
       DirectorService directorService;

       //得到幼儿园名字，用于家长和幼儿园老师填写幼儿园
       @GetMapping("getname")
       public Result<List<Director>> getname(){
      List<Director> lists= directorService.getname();
      return Result.success(lists);
       }

}
